/**
 * 工厂类
 * @returns {CandyAndGiftFactory}
 */
CandyAndGiftFactory = function()
{ 
};

/**
 * 获取本类的实例 
 * @returns
 */
CandyAndGiftFactory.getInstance = function()
{
	if(!CandyAndGiftFactory._instance){
		CandyAndGiftFactory._instance = new CandyAndGiftFactory();
	}
	return CandyAndGiftFactory._instance ;
};

/**
 * 通过大小来创建Candy
 * @param size
 * @returns
 */
CandyAndGiftFactory.prototype.getCandy = function(size)
{
	var bitmapData ; 
	switch(size)
	{
		case 3:
			bitmapData = ResManager.getInstance().getBmdByName("candy-right-long");
			break ;
		case 2:
			bitmapData = ResManager.getInstance().getBmdByName("candy-right-middle") ;
			break;
		default:
			bitmapData = ResManager.getInstance().getBmdByName("candy-right-short");
			break ;
	}
	return bitmapData ;
};

/**
 * 获取礼物图片
 * @returns
 */
CandyAndGiftFactory.prototype.getGift = function()
{
	return ResManager.getInstance().getBmdByName("gift-left"); ;
};